<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
		<link href="../css/bgcss.css"
			rel="stylesheet" type="text/css" />
<script type="text/javascript">
function iframeResizeHeight(frame_name,body_name,offset) {	
	parent.document.getElementById(frame_name).height=document.getElementById(body_name).offsetHeight+offset;
}

function Resize(){
	
 var frame_name="frame_content";
 var body_name="content"; 
 if(parent.document.getElementById(frame_name)){
  return iframeResizeHeight(frame_name,body_name,0);
 }
}

function openItem(saleNo,AmtAdd){	
	
	
	if(navigator.appName=="Microsoft Internet Explorer"){	
		window.showModalDialog('rpt?method=queryRptBySaleNO&saleNo='+saleNo+'&AmtAdd='+AmtAdd,'','dialogWidth=300px;dialogHeight=300px');
		
	}
	else if(navigator.appName=="Netscape"){		
		window.open('rpt?method=queryRptBySaleNO&saleNo='+saleNo+'&AmtAdd='+AmtAdd,'','width=300,height=300,modal=yes,location=no,status=no,toolbar=no,resizble=yes'); 
	}	
}
</script>
</head>

<body onload="Resize();">
			<!-- 正文开始 -->
			<div id="content">
				<table width="100%" border="0" cellpadding="0" cellspacing="1"
						bgcolor="#c9c9c9">	
						<tr>					
				<td height="22" bgcolor="#FFFFFF">
					<div align="center">
						<strong><span class="STYLE1">流水号</span>
						</strong>
					</div>
				</td>
				<td height="22" bgcolor="#FFFFFF">
					<div align="center">
						<strong><span class="STYLE1">收银机号</span>
						</strong>
					</div>
				</td>
				<td height="22" bgcolor="#FFFFFF">
					<div align="center">
						<strong><span class="STYLE1">应收金额</span>
						</strong>
					</div>
				</td>		
				<td height="22" bgcolor="#FFFFFF">
					<div align="center">
						<strong><span class="STYLE1">实收金额</span>
						</strong>
					</div>								
				</td>
					<td height="22" bgcolor="#FFFFFF">
					<div align="center">
						<strong><span class="STYLE1">应找金额</span>
						</strong>
					</div>								
				
							</td>	
				
					<td height="22" bgcolor="#FFFFFF">
					<div align="center">
						<strong><span class="STYLE1">销售日期</span>
						</strong>
					</div>								
				
							</td>				
						</tr>
			
				<c:forEach items="${list}" var="item" varStatus="var">
							<tr>					
				 <td height="22" bgcolor="#FFFFFF">
				 <div align="center"><span class="STYLE3"><a href="javascript:void(0)" onclick="openItem('${item.SaleNo}','${item.AmtAdd}')">${item.SaleNo}</a></span>
					</div>
				</td>
				<c:choose>
				<c:when test="${item.EcrID==0}">
								 <td height="22" bgcolor="#FFFFFF"><div align="center"><span class="STYLE3">37112000</span>
						
					</div>
				</td>
				</c:when>
				<c:otherwise>
								 <td height="22" bgcolor="#FFFFFF"><div align="center"><span class="STYLE3">${item.EcrID}</span>
						
					</div>
				</td>
				</c:otherwise>
				</c:choose>

				 <td height="22" bgcolor="#FFFFFF"><div align="center"><span class="STYLE3">￥${item.AmtAdd}</span>
						
					</div>
				</td>
				<td height="22" bgcolor="#FFFFFF"><div align="center"><span class="STYLE3">￥${item.AmtRec}</span>						
					</div>
				</td>
				<td height="22" bgcolor="#FFFFFF"><div align="center"><span class="STYLE3">￥${item.AmtRtn}</span>						
					</div>
				</td>
			
				<td height="22" bgcolor="#FFFFFF"><div align="center"><span class="STYLE3">${item.DSale}</span>						
					</div>
				</td>		
									
						</tr>
						</c:forEach>
						<tr><td>销售额合计:￥${d}元</td></tr>			
					</table>
					</div>
				</body>
				<!-- 正文结束 -->	
			
				</html>